#include <cstdio>

int main() {
    int n, sum = 1;
    int count, res = 0;

    scanf("%d", &n);
    for (int i = 1; ; i++) {
        sum += ((2 * i) + 1) * 2; 
        if (sum >= n) {
            sum -= ((2 * i) + 1) * 2;
            res = n - sum;
            count = i-1;
            break;
        }
    }

    for (int i = 2*count+1; i >= 0; i-=2) {
        for (int j = 0; j < (2*count+1-i)/2; j++) {
            printf(" ");
        }
        for (int j = 0; j < i; j++) {
            printf("*");
        }
        printf("\n");
    }
    for (int i = 0; i < 2*count+1; i+=2) {
        for (int j = 0; j < (2*count+1-i)/2; j++) {
            printf(" ");
        }
        for (int j = 0; j < i; j++) {
            printf("*");
        }
        printf("\n");
    }

    return 0;
}